/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:龙宝
 * Date:2023-11-13
 * Time:11:54
 */
public class Thread4 {
    public static void main(String[] args) {
        Thread t = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("线程2");
            }
        });
        t.start();
        int i = 0;
        while (i < 50) {
            System.out.println("主线程");
            i++;
        }
    }
}
